<?php
    if (!defined('EXPONENT')) exit('');

    if (exponent_permissions_check('configuration',exponent_core_makeLocation('administrationmodule'))) {

        $object = $db->selectObject('profilemodule_global_config',"1=1");

        if (!defined('SYS_FORMS')) require_once(BASE.'subsystems/forms.php');
        exponent_forms_initialize();

        $form = new form();
        $object->last_time=time();
        $form->meta('module','profilemodule');
        $form->meta('action','_config_save');
        
        $form->register('cache','Cache files(minute)',new textcontrol($object->cache));
        $form->register('max_item_page','Max item per page',new textcontrol($object->max_item_page));
        
        $form->register('submit','',new buttongroupcontrol('Save','','Cancel'));
        
        $template = new template('profilemodule','_meeting_config');
        $template->assign('is_edit',(isset($link->id)? 1 : 0));
        $template->assign('config',$config);
        $template->assign('form_html',$form->toHTML());
        $template->output();

    } else {
        echo exponent_http_error(403);
    }

?>
